/**
 * Wrapper stuff
 */
html,
body,
#root {
  height: 100%;
  width: 100%;
  max-height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

.resize-bar {
  position: relative;
  background-color: #AAA;
  min-height: 1px;
  min-width: 1px;
  z-index: 100;
}

.resize-handle {
  height: 16px;
  width: 16px;
  position: absolute;
  margin-left: -8px;
  margin-top: -8px;
  left: 50%;
  top: 50%;
  z-index: 150;
}
.resize-handle.x {
  margin-left: -32px;
  width: 64px;
}
.resize-handle.y {
  margin-top: -32px;
  height: 64px;
}


.window-drag {
  -webkit-app-region: drag;
}
.no-window-drag {
  -webkit-app-region: no-drag;
}

@media (prefers-color-scheme: dark) {
  html,
  body,
  #root {
    background-color: #111;
  }
  .resize-bar {
    background-color: #444;
  }
}

/**
 * Interaction utils
 */
.pointer-auto {
  pointer-events: all;
}

/**
 * Position utils
 */
.pos-rel {
  position: relative;
}
.pos-abs {
  position: absolute;
}
.pos-fixed {
  position: fixed;
}

/**
 * Opacity utils
 */
.o-25 {
  opacity: 0.25;
}
.o-50 {
  opacity: 0.5;
}
.o-75 {
  opacity: 0.75;
}

.block {
  display: block;
}
/**
 * Flexbox
 */
.flex {
  display: flex !important;
}
.flex-1 {
  display: flex;
  min-height: 0;
  flex: 1 1 1px;
}
.flex-initial {
  display: flex;
  flex: 0 0 auto;
}
.flex-col {
  flex-direction: column !important;
}
.flex-row {
  flex-direction: row !important;
}

/**
 * Position
 */
.p-fixed {
  position: fixed;
}

/**
 * Overflow
 */
.overflow-y {
  overflow-y: auto;
}
.no-overflow-y {
  overflow-y: hidden;
}
.no-overflow-x {
  overflow-x: hidden;
}
.text-overflow {
  display: block;
  text-overflow: ellipsis;
  overflow-x: hidden;
  white-space: nowrap;
}

/**
 * Height
 */
.height-100 {
  height: 100% !important;
}

/**
 * Width
 */
.width-100 {
  width: 100%;
}

/**
 * Height x Width
 */
.fill {
  height: 100%;
  width: 100%;
}

/**
 * Border
 */
.bt {
  border-top: 1px solid;
}

.br {
  border-right: 1px solid;
}

/**
 * Margin
 */

.ms-2 {
  margin-left: 0.25rem !important;
}
.ms-4 {
  margin-left: 1rem !important;
}
.ms-5 {
  margin-left: 1.5rem !important;
}

.mr-2 {
  margin-right: 0.5rem !important;
}

.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.mx-4 {
  margin-left: 1rem;
  margin-right: 1rem;
}

.my-auto {
  margin-top: auto;
  margin-bottom: auto;
}

.m-0 {
  margin: 0;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.m-2 {
  margin: 0.5rem;
}
.m-4 {
  margin: 1rem;
}

/**
 * Padding
 */
.p-1 {
  padding: 0.125rem;
}
.p-2 {
  padding: 0.25rem;
}
.p-3 {
  padding: 0.5rem;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 2rem;
}
.pb-0 {
  padding-bottom: 0 !important;
}
.pb-1 {
  padding-bottom: 0.125rem;
}
.pb-3 {
  padding-bottom: 0.5rem;
}
.pe-3 {
  padding-right: 0.5rem;
}
.pe-4 {
  padding-right: 1rem;
}
.pt-0 {
  padding-top: 0 !important;
}
.pt-2 {
  padding-top: 0.25rem;
}
.pt-4 {
  padding-top: 1rem;
}
.pt-5 {
  padding-top: 1.6rem;
}
.pt-6 {
  padding-top: 1.875rem;
}
.ps-1 {
  padding-left: 0.125rem;
}
.ps-3 {
  padding-left: 0.5rem;
}
.ps-4 {
  padding-left: 1rem;
}
.px-3 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-2 {
  padding-bottom: 0.25rem;
  padding-top: 0.25rem;
}
.py-3 {
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
}
.py-3-375 {
  padding-top: 0.675rem;
  padding-bottom: 0.675rem;
}
.py-3-5 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-bottom: 1rem;
  padding-top: 1rem;
}

/**
 * Width
 */
.mw-200 {
  max-width: 200px;
}

/**
 * Text-Align
 */
.centered {
  text-align: center;
}

/**
 * Line-Height
 */
.lh-36 {
  min-height: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
}

/**
 * Buttons
 */
.button {
  cursor: pointer;
}
.no-select {
  user-select: none;
}

/**
 * Opacity
 */
.opaque {
  opacity: 1;
  z-index: 10;
}

/**
 * Electron drag handler
 */
.draggable {
  -webkit-app-region: drag;
  user-select: none;
  cursor: move;
}
.not-draggable {
  -webkit-app-region: no-drag;
  user-select: none;
  cursor: pointer;
}

/**
 * Navbars on panel UX
 */
.panel-nav {
  position: fixed;
  top: 0;
  height: 14px;
  width: 100%;
  z-index: 150;
}
.panel-v-nav {
  position: fixed;
  left: 0;
  height: 100%;
  width: 14px;
  z-index: 150;
}
.outside-v-nav {
  display: flex;
  flex-direction: row;
  position: relative;
  padding-left: 14px;
}
.outside-nav {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 14px;
}

/*
 * Playback command overlay colors
 */
.command-state-executing {
  background-color: blue;
}
.command-state-pending {
  background-color: yellow;
}
.command-state-skipped {
  background-color: orange;
}
.command-state-passed {
  background-color: green;
}
.command-state-undetermined {
  background-color: palevioletred;
}
.command-state-failed {
  background-color: orangered;
}
.command-state-errored {
  background-color: red;
}

/*
 * MUI Overrides
 */
.MuiAutocomplete-popper {
  z-index: 3000 !important;
}
.MuiTooltip-popper {
  z-index: 4000 !important;
}

.MuiList-dense {
  padding-bottom: 0 !important;
}
.MuiList-dense > :last-child {
  border-bottom: 0 !important;
}

.square {
  border-radius: 0;
}

/*
 * Stealing from here:
 * https://codepen.io/fahimfoysal/pen/wvpKjKq
 */
#loading {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 5px solid rgb(26 108 97 / 56%);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  -webkit-animation: spin 1s ease-in-out infinite;
  position: fixed;
  margin-left: -25px;
  margin-top: -25px;
  top: 50%;
  left: 50%;
}

@keyframes spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}

@-webkit-keyframes spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}

.justify-content-start {
  justify-content: flex-start !important;
}
.justify-content-center {
  justify-content: center !important;
}

.z-1 {
  z-index: 1;
}

.z-2 {
  z-index: 2;
}

.z-3 {
  z-index: 3;
}

.z-4 {
  z-index: 4;
}

.z-5 {
  z-index: 5;
}
